import {
	createSSRApp
} from "vue";
import App from "./App.vue";

// 引入 uviewPlus
import uviewPlus from 'uview-plus'

// 引入请求方法
import api from "@/utils/api.js"


// 引入全局组件
import navbar from "@/components/navbar.vue";
import noData from "@/components/noData.vue";


export function createApp() {
	const app = createSSRApp(App);
	// 注册全局组件
	app.component("navbar", navbar);
	app.component("noData", noData);

	app.config.globalProperties.$api = api;
	// 注册uviewPlus
	app.use(uviewPlus)
	return {
		app,
	};
}